package com.ihome.android.market2.view;

import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.ScaleAnimation;

public class ScaleItemAnim {
	private long	mDurationMillis;
	private float	mFromX;
	private float	mToX;
	private float	mFromY;
	private float	mToY;

	public Animation getAnimation() {
		ScaleAnimation localScaleAnimation = new ScaleAnimation(mFromX, mToX, mFromY, mToY, Animation.RELATIVE_TO_SELF,
				0.1F, Animation.RELATIVE_TO_SELF, 0.1F);
		localScaleAnimation.setFillAfter(true);
		localScaleAnimation.setInterpolator(new DecelerateInterpolator());
		localScaleAnimation.setDuration(mDurationMillis);
		return localScaleAnimation;
	}

	public void setParams(float fromX, float toX, float fromY, float toY, long durationMillis) {
		this.mFromX = fromX;
		this.mToX = toX;
		this.mFromY = fromY;
		this.mToY = toY;
		this.mDurationMillis = durationMillis;
	}
}
